Skip to content

fix(receiver): stop claiming the receiver is listening when it is not - #39

Merged
Developer1010x merged 1 commit into
masterfrom
fix/receiver-honest-status
Aug 26, 2026
Merged

fix(receiver): stop claiming the receiver is listening when it is not#39
Developer1010x merged 1 commit into
masterfrom
fix/receiver-honest-status

Conversation

@snadahalli

Copy link
Copy Markdown
Owner

What happened

A colleague ran openplay-receiver on a Linux box and it never appeared in the sender's list. Nothing was wrong with their setup, their network, or their firewall — the receiver cannot be discovered by construction, and three separate messages told them otherwise.

Evidence gathered while diagnosing it:

Check Result
ping 192.168.0.105 up, 0% loss
Ports 7290 / 7000 / 7236 all closed
dns-sd -B _openplay._tcp (15s) zero advertisements
dns-sd -B _airplay._tcp (control, same moment) 16 results

The control matters: mDNS browsing works fine. Nothing on the LAN advertises _openplay._tcp.

And the crate explains why — its whole dependency list is:

openplay-common, egui, eframe, clap, anyhow, tracing

No openplay-discovery → cannot advertise. No openplay-signaling → cannot listen. main.rs parses args, loads config, and opens a window. That is the entire program, and it matches what CLAUDE.md already documents about the OpenPlay path being unwired.

The three false claims

  1. --name help said "shown in mDNS discovery". The flag does work — it sets the window heading — but nothing advertises it.
  2. --port help said "Override signaling port". Nothing binds it.
  3. The window rendered Listening on port 7290.

The third is the damaging one: it is what a user actually looks at, and it states plainly that the receiver is listening. It never was.

The fix

  • --name — documents that it sets the window heading and explicitly not discovery.
  • --port — marked reserved, and now logs a warning when passed, so an effect-free flag announces itself at the point of use:
    WARN openplay_receiver: --port has no effect yet: this receiver does not listen for connections port=7290
    
    Kept rather than removed: it still overrides config and validates, so it keeps working unchanged once the signaling server is wired up.
  • The waiting page — no longer says "waiting for a sender" or "listening on port N". It states that the receiver is a placeholder which advertises nothing and accepts no connections, and points at README documents OpenPlay/WebRTC casting and TLS cert generation that aren't wired up yet #11.

No behaviour change beyond the warning. This is the same non-functional receiver, now describing itself accurately.

Verification

fmt --check clean, clippy --all-targets --all-features -D warnings clean, cargo test --all 216 passed / 0 failed. --help output and the startup warning both checked by running the binary.

Does not make the receiver discoverable — that is #11, and it is a genuinely larger piece of work (advertiser, signaling server, SDP/ICE, ReceiverPipeline, plus the sender's Protocol::OpenPlay arm). Making it merely visible without any of that would put an unreachable entry in the sender's list, which is worse than absent.

A colleague ran the receiver on a Linux box and could not see it from the
sender. Nothing was wrong with their setup: `openplay-receiver` depends only
on `openplay-common`, `egui`, `eframe`, `clap`, `anyhow` and `tracing` — it
pulls in neither `openplay-discovery` nor `openplay-signaling`, so it cannot
advertise over mDNS and cannot accept a connection. Confirmed on the wire:
the host pinged fine, ports 7290/7000/7236 were all closed, and a 15-second
`dns-sd -B _openplay._tcp` returned nothing while `_airplay._tcp` returned 16
results from the same machine at the same moment.

Three separate things told them otherwise:

- `--name`'s help said "shown in mDNS discovery". The flag does work, but it
  sets the window heading; nothing advertises it.
- `--port`'s help said "Override signaling port". Nothing binds it.
- The window itself rendered "Listening on port 7290".

The last one is the worst, because it is the one a user actually sees, and it
is unambiguous: it says the receiver is listening. It never was.

Make all three honest. `--name` now says it affects the window and explicitly
not discovery; `--port` is marked reserved and logs a warning when passed, so
the effect-free flag announces itself at the point of use; and the waiting
page says the receiver is a placeholder that advertises nothing and accepts no
connections, pointing at #11.

No behaviour change beyond the warning — this is the same non-functional
receiver, now describing itself accurately.
@Developer1010x
Developer1010x merged commit 5661220 into master Aug 26, 2026
5 checks passed
Developer1010x pushed a commit that referenced this pull request Aug 26, 2026
…43)

#42 was merged twelve seconds after #41, into `fix/airplay-hkp-header` —
which #41 had just merged into master and left behind. The merge succeeded,
so nothing looked wrong, but the commits landed on a branch nothing points at
and master never received them.

Master therefore has the `X-Apple-HKP` header from #41 and none of what it was
a prerequisite for: the SRP proof still hashes g padded, transient pairing
still runs M5/M6 and gets the connection closed, and there is no encrypted
control channel. Pairing is broken on master in exactly the way #42 fixed.

This restores #42's own diff — the eight `openplay-airplay` files it actually
touched — on top of current master.

Deliberately *not* a merge of `fix/airplay-hkp-header`. That branch was cut
before #35, #36, #37, #39 and #40 merged, so a diff against it reads as
deleting `openplay-discovery/src/address.rs` and reverting 244 lines of
`openplay-sender/src/app.rs`. Merging it would silently undo five landed
fixes. Only the range between #42 and its own parent is safe to replay, and
that range touches nothing outside `openplay-airplay`.

Verified after the replay: 233 tests pass, clippy and fmt clean, and the work
from #35/#36/#37/#40 is still in the tree.

Co-authored-by: Sandeepa Nadahalli <1698507+snadahalli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants